package training.hari.oops;

/**
 * HelloWorld class.
 * 
 * Naming: Class name  -> first letter of each world (in case of multi word class name, should be upper case letter.
 * 
 * @author harinath
 *
 */
public class HelloWorld {
	
	private String name;
	private final int number =5;
	
	
	
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public HelloWorld(){
		
		System.out.println("I am a constructor with no arguments");
	}
	public HelloWorld(String name){
		this();
		this.name= name;
		
	}
	
	public HelloWorld(String firstName, String lastName){
		this(firstName);
		this.name= firstName;
	
		
		
	}
	
	/**
	 * method name should always start with lower case letter. If it is of multi word, then subsequent words should start with Upper case.
	 */
	public void sayHello(){
		System.out.println("Hello World " + name);
		
	}
	
	public void sayHello(final String name){
		System.out.println("Hello World " + name);
		
	}
	
	public String sayGoodMorning(String name){
		return "Good morning " + name;
	}
	
	public String sayGoodEvening(String firstName, String lastName){
		
		return  "Good evening " + firstName + "  " + lastName;
	}

	public static void main(String[] args) {
		
		HelloWorld world =  new HelloWorld("Hello");
		world.sayHello();
		
		System.out.println(world.sayGoodMorning("Hari"));
		
		System.out.println(world.sayGoodEvening("Hari", "Mallepally"));
		

	}

}
